package com.liam.spi;

import java.util.Iterator;
import java.util.ServiceLoader;

public interface Search {

   public void searchDoc (String keyword);






    public static void main(String[] args) {
        ServiceLoader<Search> searches = ServiceLoader.load(Search.class);

        Iterator<Search> it = searches.iterator();
        while (it.hasNext()){
            Search s = it.next();
            s.searchDoc("things");
        }
    }
}
